package com.yang.o2o.dao;

import com.yang.o2o.entity.Shop;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface ShopDao {
    /**
     * 返回queryShopList总数*/
    int queryShopCount(@Param("shopCondition") Shop shopCondition);

    /**
     *分页查询，可输入的条件有
     * 店铺名
     * 店铺状态
     * 店铺类别
     * 区域
     * owner
     * rowIndex 从第几行开始取   pageSize每行多少
     * */
    List<Shop> queryShopList(@Param("shopCondition") Shop shopCondition,
                             @Param("rowIndex")int rowIndex,
                             @Param("pageSize") int pageSize);
    /**
     * 通过店铺ID查询店铺
     * */
    Shop queryByShopId(long shopId);

    /**
     * 添加店铺*/
    int insertShop(Shop shop);

    /**
     * 更新店铺*/
    int updateShop(Shop shop);
}
